<?php
namespace app\index\validate;


use think\Validate;

class Password extends Validate
{
    protected $rule = [
        'old_password'  =>  'require|length:4,25',
        'new_password'  =>  'require|length:4,25|confirm',
        '__token__'     =>  'token',
    ];

    protected $message = [
        'old_password.require'  =>  '旧密码不能为空',
        'old_password.length'   =>  '旧密码长度不符, 4-25个字符',
        'new_password.require'  =>  '新密码不能为空',
        'new_password.length'   =>  '新密码长度不符, 4-25个字符',
        'new_password.confirm'  =>  '确认新密码和新密码不一致',
    ];
}